#ifndef LLEDCORE_H
#define LLEDCORE_H
#include "led.h"
#include <QList>
#include "ColorZone.h"
#include "TvLayout.h"
#include <QMutex>
#include <QTimer>
#include <Server/PortHandler.h>

class LedCore : public QObject
{
	QList<Led*> _LedList;

	TvLayout* _Layout;
    QMutex* _changeMutex;
    QTimer* _waitTimer;
    PortHandler _port;

	int _fps;
	int _ledNumber;


public:
    LedCore(QObject* parent = 0);
	QList<Led*>* getLedList();

	bool setFps(int fps);
    void onSendData();
	void setPortInfo();
    void setColor(int led, QColor color);
    void stop();
    void start();

};

#endif // LLEDCORE_H
